﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Nijie.Network
{
    [CustomEditor(typeof(SyncManager))]
    public class SyncManagerEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Update SyncCtrl ID By Its Name"))
            {
                BaseSyncCtrl[] syncCtrls = Resources.FindObjectsOfTypeAll<BaseSyncCtrl>();
                foreach (BaseSyncCtrl baseCtrl in syncCtrls)
                    baseCtrl.SetID(baseCtrl.name);
            }
            base.OnInspectorGUI();
        }
    }
}
